import { Injectable } from '@angular/core';
import { HttpService } from '../HTTP/http.service';
import { HttpParams } from '@angular/common/http';

import { accountApirequestInterface } from './interface/account.apirequest.interface';
@Injectable()
export class AccountApirequest implements accountApirequestInterface {

  constructor(private http: HttpService) {
  }

  async currentUser(): Promise<any> {
    return this.http.get('/api/account/CurrentUser');
  }

  async changePassword(OldPassword: string, NewPassword: string): Promise<any> {
    return this.http.post('/api/account/changePassword', { OldPassword, NewPassword });
  }

  async update(UserName: string): Promise<any> {
    return this.http.post('/api/account/Update', { UserName });
  }

}